package com.proj.android.canyondefense.core.impl;

import android.graphics.Bitmap;

import com.proj.android.canyondefense.core.base.IGraphics.PixmapFormat;
import com.proj.android.canyondefense.core.base.IPixmap;

public class AndroidPixmap implements IPixmap {
	private Bitmap _bitmap;
	private PixmapFormat _format;
	
	public AndroidPixmap(Bitmap bmp, PixmapFormat format) {
		this._bitmap = bmp;
		this._format = format;
	}

	public Bitmap getBitmap() {
		return _bitmap;
	}
	
	public int getWidth() {
		return _bitmap.getWidth();
	}

	public int getHeight() {
		return _bitmap.getHeight();
	}

	public PixmapFormat getFormat() {
		return _format;
	}

	public void dispose() {
		_bitmap.recycle();
	}

}
